# Copyright (c) Meta Platforms, Inc. and affiliates.

# @noautodeps

load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
load("../../../defs.bzl", "zs_library")

oncall("data_compression")

zs_library(
    name = "encode_thrift_kernel",
    srcs = ["encode_thrift_kernel.c"],
    headers = ["encode_thrift_kernel.h"],
    exported_deps = [
        "../../..:common",
    ],
)

zs_library(
    name = "decode_thrift_kernel",
    srcs = ["decode_thrift_kernel.c"],
    headers = ["decode_thrift_kernel.h"],
    exported_deps = [
        "../../..:common",
    ],
)

cpp_library(
    name = "thrift_kernel_utils",
    headers = ["thrift_kernel_utils.h"],
    exported_deps = [
        ":encode_thrift_kernel",
    ],
)

cpp_library(
    name = "encode_thrift_binding",
    srcs = ["encode_thrift_binding.cpp"],
    headers = ["encode_thrift_binding.h"],
    exported_deps = [
        "../../..:compress",
        ":encode_thrift_kernel",
        ":thrift_kernel_utils",
        "//folly/memory:uninitialized_memory_hacks",
    ],
)

cpp_library(
    name = "decode_thrift_binding",
    srcs = ["decode_thrift_binding.cpp"],
    headers = ["decode_thrift_binding.h"],
    exported_deps = [
        "../../..:decompress",
        ":decode_thrift_kernel",
        ":thrift_kernel_utils",
        "//folly/memory:uninitialized_memory_hacks",
    ],
)
